########################################################################
# PLACE LIST CREATIONS HERE #
########################################################################
stage_list = ["moon", "mars", "jupiter", "pluto", "space", "city"]
head_list = ["head1", "head2", "head3", "head4", "head5", "head6"]
body_list = ["middle1", "middle2", "middle3", "middle4", "middle5", "middle6"]
legs_list = ["legs1", "legs2", "legs3", "legs4", "legs5", "legs6"]
########################################################################
# PLACE ALL OTHER CODE BELOW THIS #
########################################################################
stage_image = stage_list[1]
stage.set_background(stage_image)
random_head = random.randint(0, 5)
head_image = head_list[random_head]
# sprite = codesters.Sprite("image", x, y)
head = codesters.Sprite(head_image, 0, 83)
random_body = random.randint(0, 5)
body_image = body_list[random_body]
# sprite = codesters.Sprite("image", x, y)
body = codesters.Sprite(body_image, 0, 0)
legs_index = int(head.ask("Choose an index between 0 and 5."))
legs_image = legs_list[legs_index]
# sprite = codesters.Sprite("image", x, y)
legs = codesters.Sprite(legs_image, 0, -83)
t = codesters.Teacher()
asks = t.find_function('ask')
sprites = t.find_function('Sprite')
try:
tval1 = len(asks)
except:
tval1 == "DNE"
try:
tval2 = friend_list
except:
tval2 = "DNE"
try:
tval3 = len(sprites)
except:
tval3 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 > 1, "Great job!")
t1.add_failure(tval1 == 0, "Oops! Did you delete your .ask() command?")
t1.add_failure(tval1 == 1, "Make sure you meet Requirement #1!")
t2 = TestObjective()
t2.add_success(type(tval2) is list, "Great job!")
t2.add_failure(tval2 == "DNE" or type(tval2) is not list, "Make sure you meet Requirement #2!")
t3 = TestObjective()
t3.add_success(tval3 >= 4, "Great job!")
t3.add_failure(tval3 < 4, "Make sure you meet Requirement #3!")
tester = TestManager()
tester.add_test_list([t1, t2, t3])
tester.run_tests()
tester.display_first_feedback()